<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="<?php echo $_BASE_DIR?>css_v1/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $_BASE_DIR?>css_v1/select.css" rel="stylesheet" type="text/css" />
    <!-- tips -->
    <link type="text/css" href="<?php echo $_BASE_DIR?>jqmobile/jquery.ui.tooltip.css" rel="stylesheet">
    <script type="text/javascript" src="<?php echo $_BASE_DIR?>jqmobile/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR?>jqmobile/jquery.ui.widget.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR?>jqmobile/jquery.ui.position.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR?>jqmobile/jquery.ui.tooltip.js"></script>
<!--<script type="text/javascript" src="<?php /*echo $_BASE_DIR*/?>js_v1/jquery.js"></script>-->
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/jmw.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/select-ui.min.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR?>javascripts/commond.js"></script>
<link href="<?php echo $_BASE_DIR?>uploadify/css/uploadify.css" rel="stylesheet" type="text/css" />

<style type="text/css">
#header {
	height: 85px
}

#leftside,#container,#splitBar,#splitBarProxy {
	top: 90px
}
</style>
<script type="text/javascript">
$(document).ready(function(e) {
    $(".select1").uedSelect({
		width : 345			  
	});
	$(".select2").uedSelect({
		width : 167  
	});
	$(".select3").uedSelect({
		width : 110
	});
    //启动tip功能
    $( document ).tooltip({
        position: { my: "left+15 center", at: "right center" }
    });
});
</script>
<script src="<?php echo $_BASE_DIR?>javascripts/jquery.ocupload.min.js"
	type="text/javascript"></script>


</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="<?php echo url("leftmenu/bottom")?>">首页</a></li>
    <li><a href="/">激活码激活</a></li>
    </ul>
    </div>
    <div class="formbody">
    <div id="usual1" class="usual">
  	<div id="tab1" class="tabson">
  
   

		  <ul class="forminfo">
				<li>
				<label>激活码：</label>
				<input type="text" title="平台激活码总数" class="dfinput" style="width:150px;" value="<?php echo $activecode->active_code  ?>" readonly />
				</li>
                <li>
				<label>激活用户手机：</label>
				<input type="text" title="激活用户手机" class="dfinput" style="width:150px;" value="" id="acctname" />
				</li>
				
				<li style="text-indent:120px; color:#FF0000; height:40px; line-height:40px;">提示：请仔细校验用户姓名和手机号码，一旦激活不可撤销！</li>
				
	    <li><label>&nbsp;</label><input name="" onclick="activecode();" type="submit" class="btn" value="确认激活"/></li>
	  </ul>
	
<script type="text/javascript">
function activecode(){
	
	var ajaxurl = "/admin/activecode/use";
	var acctname = $('#acctname').val();
	$.post(ajaxurl, {
		keyid:<?php echo $_GET['keyid']?>,
		op:'checkuser',
		acctname:acctname,
	       }, function(data){
	    		if(data.status == 0){
	    			if(confirm('确定激活用户【'+data.msg+'】')){	
	    				$.post("/admin/activecode/use", {
	    					keyid:<?php echo $_GET['keyid']?>,
	    					op:'active',
	    					acctname:acctname,
	    				}, function(data){
	    					if(data.status == 0){
	    						alert(data.msg);
	    						return false;	
	    					}else{
	    						alert(data.msg);
	    						return false;	
	    					}
	    				}, 'json');
	    			   }
	    		}else{
	    			alert(data.msg);
	    			return false;	
	    		}
	}, 'json');

}
</script> 
    </div></div></div></body></html>
    
